package com.cgw.dmplt.rent.dao.ibatis;

import java.util.List;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.cgw.dmplt.rent.domain.PayFlow;
import com.cgw.dmplt.rent.dao.PayFlowDao;

/**
 *
 */
public class PayFlowDaoImpl extends SqlMapClientDaoSupport implements PayFlowDao
{
    /**
     * insert.
     * @param payFlow payFlow
     * @return id
     * @throws
     */
    public String insertPayFlow(PayFlow payFlow) {
    	getSqlMapClientTemplate().insert("PayFlow_insertPayFlow", payFlow);
    	return null;
    }

    /**
     * delete.
     * @param payFlow payFlow
     * @throws
     */
    public void deletePayFlow(PayFlow payFlow) {
        getSqlMapClientTemplate().update("PayFlow_deletePayFlow", payFlow);
    }
    
    /**
     * update.
     * @param payFlow payFlow
     * @throws
     */
    public void updatePayFlow(PayFlow payFlow) {
    	getSqlMapClientTemplate().update("PayFlow_updatePayFlow", payFlow);
    }
    
    /**
     * find.
     * @param id id
     * @return payFlow
     * @throws
     */
    public PayFlow findPayFlow(Integer pk) {
        PayFlow payFlow = (PayFlow) getSqlMapClientTemplate().queryForObject("PayFlow_findPayFlow", pk);
        return payFlow;
    }
    
    /**
     * list.
     * @param payFlow payFlow
     * @return payFlow list
     * @throws
     */
    public List listPayFlow(PayFlow payFlow) {
        List list = getSqlMapClientTemplate().queryForList("PayFlow_listPayFlow", payFlow);
        return list;
    }  
    
    /**
     * listCount.
     * @param payFlow payFlow
     * @return list count
     * @throws
     */
    public Integer listPayFlowCount(PayFlow payFlow) {
        Integer count = (Integer)getSqlMapClientTemplate().queryForObject("PayFlow_listPayFlowCount", payFlow);
        return count;
    }  
}
